package cn.dmp.util

import redis.clients.jedis.Jedis

object RedisHander {
  /**
    * 获取appName
    * @param appname
    * @param appid
    * @return
    */
  def getAppName(appname: String, appid: String):String = {
    var appNameNew = if ("0".equals(appname) || "".equals(appname)) {
      val jedis: Jedis = Jpools.getJedis()
      val appTemp: String = jedis.hget("dict", appid)
      jedis.close()
      if (null == appTemp || "".equals(appTemp)) appid else appTemp
    } else appname

    appNameNew
  }

}
